package ${package.ExportDto};

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.converters.localdatetime.LocalDateTimeStringConverter;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * ${table.comment!}导出DTO
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Data
public class ${ExportDtoName} implements Serializable {
    @Serial
    private static final long serialVersionUID = -1;

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list ExportFields as field>
    /**
     * ${field.comment}
     */
    <#if field.date>
    @ExcelProperty(value = "${field.nameCn}", converter = LocalDateTimeStringConverter.class)
    @ColumnWidth(22)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    <#else>
    @ExcelProperty("${field.nameCn}")
    </#if>
    private ${field.propertyType} ${field.propertyName};
<#-- ----------  END 字段循环遍历  ---------->
</#list>
}
